package EX2;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class demo2_4 {
    public static void main(String[] args) throws IOException {
        File f=new File("C:/filea/a.txt");
        InputStream is=new FileInputStream(f);

        byte[] buf=new byte[is.available()];
        int len;
        while ((len=is.read(buf))!=-1){
            String s=new String(buf);
            System.out.println(s);
        }
    }
}
